home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / AdobeExamples / NX_CtlPoints / ControlViewWraps.psw < prev    next >
Text File  |  1995-06-12  |  3KB  |  99 lines

  1.  
  2. /*
  3.  * (a)  (C) 1990 by Adobe Systems Incorporated. All rights reserved.
  4.  *
  5.  * (b)  If this Sample Code is distributed as part of the Display PostScript
  6.  *    System Software Development Kit from Adobe Systems Incorporated,
  7.  *    then this copy is designated as Development Software and its use is
  8.  *    subject to the terms of the License Agreement attached to such Kit.
  9.  *
  10.  * (c)  If this Sample Code is distributed independently, then the following
  11.  *    terms apply:
  12.  *
  13.  * (d)  This file may be freely copied and redistributed as long as:
  14.  *    1) Parts (a), (d), (e) and (f) continue to be included in the file,
  15.  *    2) If the file has been modified in any way, a notice of such
  16.  *      modification is conspicuously indicated.
  17.  *
  18.  * (e)  PostScript, Display PostScript, and Adobe are registered trademarks of
  19.  *    Adobe Systems Incorporated.
  20.  * 
  21.  * (f) THE INFORMATION BELOW IS FURNISHED AS IS, IS SUBJECT TO
  22.  *    CHANGE WITHOUT NOTICE, AND SHOULD NOT BE CONSTRUED
  23.  *    AS A COMMITMENT BY ADOBE SYSTEMS INCORPORATED.
  24.  *    ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY
  25.  *    OR LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO
  26.  *    WARRANTY OF ANY KIND (EXPRESS, IMPLIED OR STATUTORY)
  27.  *    WITH RESPECT TO THIS INFORMATION, AND EXPRESSLY
  28.  *    DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY, 
  29.  *    FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT
  30.  *    OF THIRD PARTY RIGHTS.
  31.  */
  32.  
  33. /*
  34.  *    ControlViewWraps.psw
  35.  *
  36.  *    Version:    2.0
  37.  *    Author:    Ken Fromm
  38.  *    History:
  39.  *            03-07-91        Added this comment.
  40.  */
  41.  
  42. /* StartTime is stored in the interpreter and contains the initial real time    */                                            
  43. defineps PSWMarkTime ()
  44.     /StartTime realtime def
  45. endps
  46.  
  47. /* The difference between the current real time and the initial time stored                */
  48. /* in StartTime is returned to the calling procedure in the output arg ElapsedTime. */
  49. defineps PSWReturnTime (|int *ElapsedTime)
  50.     realtime StartTime sub 
  51.     ElapsedTime
  52. endps
  53.  
  54. /*
  55. * This wrap is called in the +newFrame:(NXRect *) frm method to
  56. * define and bind procedures in the interpreter.  These procedures
  57. * are then called from within other wraps.
  58. */
  59. defineps PSWDefsView (float BGColor, BGColorStr, BGWidthStr, BGrect[4])
  60.  
  61.     /BGC BGColor def
  62.     /BGCS BGColorStr def
  63.     /BGWS BGWidthStr def
  64.     /BGR BGrect  def
  65.     
  66.     /EV  { 
  67.         BGC setgray
  68.         BGR dup rectfill
  69.         BGCS setgray
  70.         BGWS setlinewidth
  71.         rectstroke
  72.     } bind def
  73. endps
  74.  
  75. defineps PSWEraseView ()
  76.     EV
  77. endps
  78.  
  79. defineps     PSWBasic(float X, Y; char *Figure, *Op)
  80.     X Y Figure Op
  81. endps
  82.  
  83. defineps PSWUserPath (float numstring Pts[Tot_Pts]; int Tot_Pts; char Ops[Tot_Ops]; int Tot_Ops; char *Op)
  84.     [Pts (Ops)] Op
  85. endps
  86.  
  87. defineps PSWRectDraw (float numstring XYScratch[j]; int j; char *rectOp)
  88.     XYScratch rectOp
  89. endps
  90.  
  91. defineps PSWShow (float X, Y; char *Char)
  92.      X Y moveto  (Char) show
  93. endps
  94.  
  95. defineps PSWXYShow (float X, Y; char *CharString; float numstring XYCoords[j]; int j)
  96.     X Y moveto  (CharString) XYCoords xyshow
  97. endps
  98.  
  99.